<template>
  <div class="home">
    <el-container>
      <el-header>
        <div>
          <span class="title">
            <span>车位大联盟</span>
            <span>CHE WEI DA LIAN MENG</span>
          </span>

          <div
            @click="showQuitChangeBtn = !showQuitChangeBtn"
            class="header-image"
          >
            <img
              src="../assets/home_touxiang.png"
            />
          </div>
        </div>
      </el-header>
      <el-container>
        <el-aside width="250px">
          <el-menu
            default-active="0"
            @open="handleOpen"
            @close="handleClose"
            router
          >
            <el-menu-item index="index">首页</el-menu-item>

            <el-menu-item index="shop-show">
              <i class="el-icon-s-claim"></i>
              <span slot="title">商家管理</span>
            </el-menu-item>

            <el-menu-item index="order-show">
              <i class="el-icon-s-marketing"></i>
              <span slot="title">订单管理</span>
            </el-menu-item>

            <el-menu-item index="property-show">
              <i class="el-icon-s-check"></i>
              <span slot="title">楼盘管理</span>
            </el-menu-item>

            <el-menu-item index="advertisement-show">
              <i class="el-icon-message-solid"></i>
              <span slot="title">广告管理</span>
            </el-menu-item>

            <el-submenu index="11">
              <template slot="title">
                <i class="el-icon-s-data"></i>
                <span>平台活动</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="coupon-show">优惠券</el-menu-item>
                <el-menu-item index="activity-show">促销活动</el-menu-item>
              </el-menu-item-group>
            </el-submenu>

            <el-menu-item index="user-show">
              <i class="el-icon-s-custom"></i>
              <span slot="title">用户信息</span>
            </el-menu-item>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "Home",
  components: {},
};
</script>

<style scoped>
.el-header {
  background: linear-gradient(to left, rgb(95, 167, 255), rgb(95, 99, 255));
}
.el-header > div {
  display: flex;
  justify-content: space-between;
  height: 100%;
}
.title {
  display: inline-flex;
  color: white;
  height: 100%;
  justify-content: center;
  flex-direction: column;
}
.title span:first-child {
  font-size: 20px;
  font-weight: bold;
}
.el-aside {
  min-height: calc(100vh - 60px);
  display: block;
  position: absolute;
  left: 0;
  top: 60px;  
  bottom: 0;
  background-color: white;
  box-shadow: 2px 0px 0px rgba(236, 245, 255, 1);
}
.el-main {
  background-color: rgba(236, 245, 255, 0.5);
  /* min-height: 100vh; */
  /* position: fixed; */
  /* right: 0; */
  position: absolute;
  left: 250px;
  right: 0;
  top: 60px;
  bottom: 0;
  overflow-y: scroll;
}

.header-image {
  margin-top: 5px;
  border-radius: 50%;
  overflow: hidden;
  background-color: red;
  height: 50px;
}
.header-image img {
  width: 50px;
  height: 50px;
}
</style>
